﻿using System;
using Google.Analytics.Common;
using Google.Analytics.Model.Feeds.Attributes;
using Google.GData.Client;

namespace Google.Analytics.Model.Feeds
{
    public class DataFeed : AbstractFeed
    {
        public DataFeed(Uri uriBase, IService service) : base(uriBase, service)
        {
            AddExtension(new Attributes.Aggregates());
        }

        /// <summary>
        /// This needs to get implemented by subclasses
        /// </summary>
        /// <returns>AtomEntry</returns>
        public override AtomEntry CreateFeedEntry()
        {
            return new DataEntry();
        }

        public Attributes.Aggregates Aggregates
        {
            get { return FindExtension(AnalyticsParserNameTable.XmlAggregatesElement, AnalyticsParserNameTable.AnalyticsNamespace) as Aggregates; }
        }
    }
}
